package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;

public class LeaseExcetion extends  RuntimeException{
    private Integer code;
    public LeaseExcetion(Integer code,String message){
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
    public LeaseExcetion(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
